home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
csapi
/
spell.dlg
< prev
next >
Wrap
Text File
|
1993-11-02
|
8KB
|
288 lines
VERSION 2.00
Begin Form frmSpellChecker
BorderStyle = 1 'Fixed Single
Caption = "Spell Checker"
ClientHeight = 2670
ClientLeft = 1365
ClientTop = 705
ClientWidth = 6540
Height = 3075
Left = 1305
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2670
ScaleWidth = 6540
Top = 360
Width = 6660
Begin CommandButton cmdDelete
Caption = "&Delete"
Height = 315
Left = 4020
TabIndex = 17
Top = 900
Width = 1140
End
Begin CommandButton cmdIgnore
Caption = "&Ignore"
Default = -1 'True
Height = 315
Left = 4020
TabIndex = 8
Top = 500
Width = 1140
End
Begin TextBox tbxChangeTo
Height = 285
Left = 1515
TabIndex = 3
Top = 525
Width = 2355
End
Begin ComboBox ddlAddWordsTo
Enabled = 0 'False
Height = 300
Left = 1635
Style = 2 'Dropdown List
TabIndex = 7
Top = 2220
Width = 2235
End
Begin ListBox lbxSuggestions
Height = 1200
Left = 1620
TabIndex = 5
Top = 795
Width = 2250
End
Begin CommandButton cmdCancel
Cancel = -1 'True
Caption = "Cancel"
Height = 315
Left = 5280
TabIndex = 15
Top = 1700
Width = 1140
End
Begin CommandButton cmdUndoLast
Caption = "&Undo Last"
Enabled = 0 'False
Height = 315
Left = 5280
TabIndex = 13
Top = 1300
Width = 1140
End
Begin CommandButton cmdChangeAll
Caption = "C&hange All"
Enabled = 0 'False
Height = 315
Left = 5280
TabIndex = 11
Top = 900
Width = 1140
End
Begin CommandButton cmdIngoreAll
Caption = "I&gnore All"
Enabled = 0 'False
Height = 315
Left = 5280
TabIndex = 9
Top = 500
Width = 1140
End
Begin CommandButton cmdSuggest
Caption = "&Suggest"
Height = 315
Left = 4020
TabIndex = 14
Top = 1700
Width = 1140
End
Begin CommandButton cmdAdd
Caption = "&Add"
Enabled = 0 'False
Height = 315
Left = 4020
TabIndex = 12
Top = 1300
Width = 1140
End
Begin CommandButton cmdChange
Caption = "&Change"
Enabled = 0 'False
Height = 315
Left = 4020
TabIndex = 10
Top = 900
Width = 1140
End
Begin CommandButton cmdOptions
Caption = "&Options..."
Enabled = 0 'False
Height = 315
Left = 4020
TabIndex = 16
Top = 2220
Width = 2385
End
Begin Label lblAddWordsTo
AutoSize = -1 'True
Caption = "Add &Words To:"
Height = 195
Left = 105
TabIndex = 6
Top = 2295
Width = 1290
End
Begin Label lblSuggestions
AutoSize = -1 'True
Caption = "Suggestio&ns:"
Height = 195
Left = 105
TabIndex = 4
Top = 900
Width = 1110
End
Begin Label lblChangeTo
AutoSize = -1 'True
Caption = "Change &To:"
Height = 195
Left = 105
TabIndex = 2
Top = 615
Width = 1005
End
Begin Label lblUnknownWord
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1755
TabIndex = 1
Top = 105
Width = 4665
End
Begin Label lblNotInDictionary
AutoSize = -1 'True
Caption = "Not in Dictionar&y:"
Height = 195
Left = 105
TabIndex = 0
Top = 135
Width = 1500
End
End
Sub cmdCancel_Click ()
csReturnStatus = csCancel
End Sub
Sub cmdChange_Click ()
Call SpellerChange((tbxChangeTo.Text))
Call SpellerCheck(fssIsContinued, sccVerifyBuffer, "")
Call ResetSpellDialog
End Sub
Sub cmdDelete_Click ()
Call SpellerChange("")
csUnknownWordStart = csUnknownWordStart - csUnknownWordLength
Call SpellerCheck(fssIsContinued, sccVerifyBuffer, "")
Call ResetSpellDialog
End Sub
Sub cmdIgnore_Click ()
Call SpellerCheck(fssIsContinued, sccVerifyBuffer, "")
Call ResetSpellDialog
End Sub
Sub cmdSuggest_Click ()
Call SpellerCheck(fssIsContinued, sccSuggest, (tbxChangeTo.Text))
Call ParseToAdditem(csSuggestionList, lbxSuggestions, Chr$(0), True)
If lbxSuggestions.ListCount Then
lbxSuggestions.ListIndex = 0
lbxSuggestions.SetFocus
cmdChange.Enabled = True
cmdChange.Default = True
cmdSuggest.Enabled = False
Else
lbxSuggestions.AddItem "(No Suggestions)"
tbxChangeTo.SetFocus
End If
End Sub
Sub Form_Load ()
csUnknownWordStart = 1
csUnknownWordLength = 0
csTextBufferOffset = 1
csReturnStatus = 0
Call SpellerCheck(fssStartsSentence, sccVerifyBuffer, "")
Call ResetSpellDialog
End Sub
Sub lbxSuggestions_Click ()
If lbxSuggestions.Text = "(No Suggestions)" Then
lbxSuggestions.ListIndex = -1
tbxChangeTo.SetFocus
ElseIf lbxSuggestions.ListIndex >= 0 Then
tbxChangeTo.Text = lbxSuggestions.Text
End If
End Sub
Sub ResetSpellDialog ()
cmdChange.Visible = True
cmdDelete.Visible = False
Me.Visible = True
UnknownWord$ = spellerUnknownWord()
lblUnknownWord.Caption = UnknownWord$
Select Case csReturnStatus
Case scrsUnknownInputWord
lblNotInDictionary.Caption = "Not in Dictionar&y:"
tbxChangeTo.Text = UnknownWord$
cmdIgnore.Default = True
cmdChange.Enabled = False
cmdSuggest.Enabled = True
lbxSuggestions.Clear
tbxChangeTo.SetFocus
Case scrsRepeatWord
lblNotInDictionary.Caption = "Re&peated Word:"
cmdDelete.Visible = True
cmdSuggest.Enabled = False
Case scrsNoSentenceStartCap
lblNotInDictionary.Caption = "Capitalization:"
tbxChangeTo.Text = UCase$(Left$(UnknownWord$, 1)) & Mid$(UnknownWord$, 2)
End Select
End Sub
Sub tbxChangeTo_Change ()
If Len(tbxChangeTo.Text) = 0 Then
cmdDelete.Visible = True
cmdDelete.Default = True
ElseIf tbxChangeTo.Text <> lblUnknownWord.Caption Then
cmdDelete.Visible = False
cmdChange.Enabled = True
cmdChange.Default = True
Else
cmdDelete.Visible = False
cmdChange.Enabled = False
cmdIgnore.Default = True
End